Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <p>Click the "Try it" button to underline the H1 element:</p> <button onclick="myFunction()">Try it</button> <h1 id="myH1">This is my header</h1> <script> function myFunction() { document.getElementById("myH1").style.textDecoration = "underline"; } </script> </body> <!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss_js_text-decoration by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:53:23 GMT --> </html>
Result:
Try it Yourself - © w3schools.com